<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="utf-8">
    <title>显示图书信息</title>
    <style>
        .tt{border-collapse: collapse;margin:20px auto;}
        .tt tr th,.tt tr td{
            border: 1px solid #d6d6d6;
            padding: 5px;
            text-align: center;
        }
    </style>
</head>
<body>
    <table class="tt">
        <tr>
            <th>id</th>
            <th>名称</th>
            <th>价格</th>
            <th>日期</th>
            <th>操作</th>
        </tr>
        <c:forEach items="${books}" var="b">
            <tr>
                <td>${b.id}</td>
                <td>${b.name}</td>
                <td><fmt:formatNumber value="${b.price}" pattern="#00.0000#" /></td>
                <td><fmt:formatDate value="${b.bdate}" pattern="yyyy-MM-dd"/></td>
                <td><a href="/book/del/${b.id}.html">删除</a></td>
            </tr>
        </c:forEach>
    </table>
</body>
</html>
